package org.huntaway.kindergarten.service.bi.funds;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.huntaway.kindergarten.manager.PayoutMng;
import org.huntaway.kindergarten.po.FinanceType;
import org.huntaway.kindergarten.po.OutDefine;
import org.huntaway.kindergarten.po.Payout;
import org.huntaway.kindergarten.service.KindProcessor;
import org.huntaway.kindergarten.util.GlobalCon;

public class PayoutService extends KindProcessor<Payout> {
	public PayoutService() {
		super();
		baseMng = (PayoutMng) sm.getMng(GlobalCon.PAYOUT);
	}
	public ActionForward addBegin(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.addBegin(mapping, form, request, response);
		request.setAttribute("outLst", dateManage.findbyhql("from OutDefine").list());	
		request.setAttribute("auLst", dateManage.findbyhql("from SysUser where Userstat=0")
				.list());
		return serBean;
	}
	public ActionForward addProcess(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super
				.addProcess(mapping, form, request, response);
		return serBean;
	}
	public ActionForward editBegin(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.editBegin(mapping, form, request, response);
		request.setAttribute("outLst", dateManage.findbyhql("from OutDefine")
				.list());
		request.setAttribute("auLst", dateManage.findbyhql("from SysUser where Userstat=0")
				.list());
		return serBean;
	}
	@Override
	public Payout getObj() {
		return new Payout();
	}
}
